package com.woniu.user.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.woniu.user.controller.form.SearchForm;
import com.woniu.user.model.Book;
import com.woniu.user.model.Order;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 订单信息表 服务类
 * </p>
 *
 * @author Silas
 * @since 2023-02-15
 */
public interface OrderService extends IService<Order> {

    Page<Order> query(Integer userId, Integer current, Integer size, String condition);

    void createOrder(Book book);

    IPage<Order> getMyOrder(Integer userId, Page<Order> orderPage);

    void pay(Integer orderId, Integer userId, String password);

    void cancel(Integer orderId, Integer userId);

    void checkPay(Integer orderId, Integer userId, String password);

    void applyBack(Integer orderId, String reason, Integer userId);

    IPage<Order> search(SearchForm form, Integer userId);
}
